package com.yyy.service;

import com.yyy.entity.Pnr;
import com.yyy.repository.PnrRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.stereotype.Service;

/**
 * Created by admin on 2018/8/7.
 */
@Service
public class PnrService extends AbstractBaseService<Pnr, Integer, PnrRepository>  {
    //@EntityGraph(value="passengersQuery",type= EntityGraph.EntityGraphType.FETCH)
    public Page<Pnr> findAll(int page, int pageSize) {
        return repository.findAll(PageRequest.of(page, pageSize));
    }
}
